package com.czp.ssm.dao;

import com.czp.ssm.bean.User;
import com.czp.ssm.bean.UserExample;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

public interface UserMapper {
    long countByExample(UserExample example);

    int deleteByExample(UserExample example);

    int deleteByPrimaryKey(Long id);

    int insert(User record);

    int insertSelective(User record);

    List<User> selectByExample(UserExample example);

    User selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") User record, @Param("example") UserExample example);

    int updateByExample(@Param("record") User record, @Param("example") UserExample example);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    /**
     * 根据companyID和模糊查询名称
     * @param map
     * @return
     */
	List<User> selectUserByUserNameAndCompanyId(Map<String, String> map);

	User selectUserByUserId(String userId);

	List<User> selectUserByCompanyId(String companyId);

	/**
	 * 根据手机号获取用户
	 * @param username
	 * @return
	 */
	User selectUserByUserPhone(String userPhone);
}